<script>
    var pnum = {$pnum};
    {if condition="(isset($filter)) AND ($filter)"}
    var filter = {$filter};
    {/if}
        var user_id = {$userId};
        {if condition="(!isset($search)) OR (!$search)"}
        var search = 0;
        var goUrl = "/{$Request.module}/detail/lst/user_id/"+user_id+"/filter/"+filter+".html?page="+pnum;
        {else/}
            var search = {$search};
            var goUrl = "/{$Request.module}/detail/search/user_id/"+user_id+".html?page="+pnum;
            {/if}

</script>
<table class="table table-hover table-bordered">
    <thead>
    <tr>
        <th style="width:15%">用户名称</th>
        <th style="width:15%">收入/支出</th>
        <th style="width:15%">渠道</th>
        <th style="width:20%">金额</th>
        <th style="width:20%">时间</th>
        <th style="width:15%">操作</th>
    </tr>
    </thead>
    <tbody>
    {if condition="$list->isEmpty() == false"}
    {foreach name="list" item="v"}
    <tr>
        <td>{$v['user_name']}</td>
        <td>{if condition="$v['de_type'] eq 1"}收入{elseif condition="$v['de_type'] eq 2"/}支出{/if}</td>
        <td>
            {if condition="$v['de_type'] eq 1"}
            {switch name="v.sr_type"}
            {case value="1"}订单分成{/case}
            {case value="2"}订单退款{/case}
            {case value="3"}邀请注册{/case}
            {case value="4"}充值{/case}
            {case value="5"}取消订单{/case}
            {case value="6"}后台增加余额{/case}
            {case value="7"}余额充值{/case}
            {case value="8"}后台金币充值{/case}
            {/switch}
            {elseif condition="$v['de_type'] eq 2"/}
            {switch name="v.zc_type"}
            {case value="1"}提现{/case}
            {case value="2"}支付订单{/case}
            {case value="3"}后台减少余额{/case}
            {case value="4"}后台减少金币{/case}
            {/switch}
            {/if}
        </td>
        <td>{$v.price}</td>
        {if condition="$v['withdraw'] eq ''"}
        <td>{:date('Y-m-d H:i:s',$v['time'])}</td>
        {else}
        <td>
            申请时间：{:date('Y-m-d H:i:s',$v['withdraw']['create_time'])}</br>
            打款时间：{:date('Y-m-d H:i:s',$v['withdraw']['wtime'])}
        </td>
        {/if}
        <td><button type="button" class="btn btn-primary btn-xs" onclick="getmxinfo({$v.id},{$v.user_id},this);"><i class="fa fa-pencil"></i>&nbsp;查看详细</button></td>
    </tr>
    {/foreach}
    {else/}
    <tr><td colspan="9" style="text-align:center; font-size:14px;">没有找到相关数据</td></tr>
    {/if}
    </tbody>
</table>
<div class="row"><div class="pagination" style="float:right; margin-right:20px;">{$page}</div></div>